

namespace CoreMobile.sec
{
    public class DeviceIDValidator : AbsrtactSecurityValidator
    {

        private static DeviceIDValidator cached;
        public static bool isValid(string id)
        {
            if(cached == null) cached= new DeviceIDValidator();
            return cached.isValidID(id);
        }


        #region Overrides of AbsrtactSecurityValidator

        protected override string generatedUniqueID()
        {
            
            DeviceInfo deviceInfo = new DeviceInfo();
            /*for (int i = 0; i < 1000; i++)
            {
                deviceInfo = new DeviceInfo();  
                flag = flag && (deviceInfo.SerialNumber == "353428040027605")
                    && (deviceInfo.SubscriberID == "730027100114165");
            }*/
           
            

            return deviceInfo.SubscriberID+deviceInfo.SerialNumber;
        }

        #endregion

    }
}